﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="frmCancelacionVenta.aspx.cs" Inherits="pryCallCenter.Procesos.CancelacionVenta.frmCancelacionVenta" %>

<%@ Register Assembly="DevExpress.Web.v11.2, Version=11.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxPopupControl" TagPrefix="dx" %>

<%@ Register Assembly="DevExpress.Web.v11.2, Version=11.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxUploadControl" TagPrefix="dx" %>

<%@ Register Assembly="DevExpress.Web.ASPxGridView.v11.2, Version=11.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>

<%@ Register Assembly="DevExpress.Web.ASPxEditors.v11.2, Version=11.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>

<%@ Register Assembly="DevExpress.Web.v11.2, Version=11.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxRoundPanel" TagPrefix="dx" %>
<%@ Register assembly="DevExpress.Web.v11.2, Version=11.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPanel" tagprefix="dx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
        .style2
        {
            margin-left:2.5em;
            margin-top:1em;
        }
        .style3
        {
            margin-left:2em;
            margin-top:0.5em;
        }
        .panel
        {
            float:left;
            margin-right:0.5em;
            width:40%;
            margin-left:1em;
        }
        .panel2
        {
            float:left;
            margin-right:0.5em;
            width:49%;
        }
        .panel3
        {
            clear:both;
            margin-top:1em;
            margin-left:1em;
        }
        .title_tabla
        {
            font-weight:bold;
            margin-left:40%;
            
        }
        .fs1
        {
            margin: 0 auto;
            width: 75%;
        }
        .titulo
        {            
            font-weight:bold;
        }
    </style>   
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <dx:ASPxRoundPanel ID="ASPxRoundPanel1" runat="server" Width="100%" HeaderText="Cancelacion de Venta" Border-BorderStyle="NotSet">
        <PanelCollection>
            <dx:PanelContent>
                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                    <ContentTemplate>
                        <div class="CssHeader">
                            <div align="center" class="CssTitle4" >
                                        CANCELACION DE VENTA
                            </div>                
                            <div class="CssRigth">
                                <dx:ASPxPanel ID="ASPxPanel1" runat="server" Width="100%">
                                    <PanelCollection>
                                        <dx:PanelContent>                                
                                            <table class="style1">
                                                <tr>
                                                    <td class="style1">Usuario:</td>  
                                                    <td>
                                                        <dx:ASPxTextBox ID="txtUsuario" runat="server" Width="170px">
                                                        </dx:ASPxTextBox>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>Fecha de Pedido:</td>    
                                                    <td>
                                                        <dx:ASPxDateEdit ID="dtpFecha" runat="server">
                                                        </dx:ASPxDateEdit>                                     
                                                    </td>
                                                </tr>
                                            </table>                                
                                        </dx:PanelContent>
                                    </PanelCollection>
                                </dx:ASPxPanel>
                            </div>
                        </div>
                        <div class="CssCuerpo">
                            <table class="style1">
                                <tr>
                                    <td>
                                        <span class="title_tabla">Detalle de Venta</span>
                                        <dx:ASPxLabel ID="lblnropedido" runat="server" Text="" CssClass="titulo"></dx:ASPxLabel>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <dx:ASPxGridView ID="dgvDetalleVenta" runat="server" style="margin:0.5em auto; width:100%"  KeyFieldName="cliente"
                                            AutoGenerateColumns="False" ClientInstanceName="dgvDetalleVenta">
                                            <Columns>
                                                <dx:GridViewDataTextColumn Caption="Cliente" ShowInCustomizationForm="True" 
                                                    VisibleIndex="0" FieldName="cliente">
                                                </dx:GridViewDataTextColumn>
                                                <dx:GridViewDataTextColumn Caption="Operador de Venta" 
                                                    ShowInCustomizationForm="True" VisibleIndex="1" FieldName="operador">
                                                </dx:GridViewDataTextColumn>
                                                <dx:GridViewDataTextColumn Caption="Fecha de Pedido" 
                                                    ShowInCustomizationForm="True" VisibleIndex="2" FieldName="fhregistro">
                                                </dx:GridViewDataTextColumn>
                                                <dx:GridViewDataTextColumn Caption="Producto / Servicio" 
                                                    ShowInCustomizationForm="True" VisibleIndex="3" 
                                                    FieldName="producto">
                                                </dx:GridViewDataTextColumn>
                                                <dx:GridViewDataTextColumn Caption="Estado" ShowInCustomizationForm="True" 
                                                    VisibleIndex="4" FieldName="estado">
                                                </dx:GridViewDataTextColumn>
                                                <dx:GridViewDataTextColumn Caption="Observacion de Seguimiento" 
                                                    ShowInCustomizationForm="True" VisibleIndex="5" FieldName="obsseg">
                                                </dx:GridViewDataTextColumn>
                                            </Columns>
                                        </dx:ASPxGridView>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <dx:ASPxTextBox ID="hid_tipoCancelacion" runat="server" Width="1px" Visible="false"></dx:ASPxTextBox>
                                    </td>
                                    <td>
                                        <dx:ASPxTextBox ID="hid_ParcialFlag" runat="server" Width="1px" Visible="false"></dx:ASPxTextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="width:100%; padding:1em 0;">                          
                                        <fieldset class="fs1">
                                            <legend>Cancelacion de Venta</legend>
                                            <div class="panel">
                                                <dx:ASPxRadioButton ID="rbtCP" runat="server" Text="Cancelacion Parcial" 
                                                        GroupName="Cancelacion" Native="True" AutoPostBack="True" 
                                                        OnCheckedChanged="rbtCP_CheckedChanged">
                                                </dx:ASPxRadioButton>
                                                <dx:ASPxLabel ID="ASPxLabel1" runat="server" Text="Servicios Cancelados del Paquete : " CssClass="style2"></dx:ASPxLabel>
                                                <div class="style3">
                                                    <dx:ASPxCheckBox ID="chkinternet" runat="server" Text="Internet"></dx:ASPxCheckBox>
                                                    <dx:ASPxCheckBox ID="chkteleffija" runat="server" Text="Telefonía Fija"></dx:ASPxCheckBox>
                                                    <dx:ASPxCheckBox ID="chktelefmovil" runat="server" Text="Telefonía Movil"></dx:ASPxCheckBox>
                                                </div>
                                            </div>
                                            <div class="panel2">
                                            <dx:ASPxRadioButton ID="rbtIAC" runat="server" Text="Importar Archivo de Cancelaciones" GroupName="Cancelacion" Native="True" 
                                                    AutoPostBack="False" OnCheckedChanged="rbtIAC_CheckedChanged">
                                            </dx:ASPxRadioButton>
                                                <dx:ASPxUploadControl ID="uplArchivo" runat="server" Width="280px" 
                                                    style="margin-left:1.5em; margin-top:0.25em" Height="60px" 
                                                    ShowProgressPanel="True" ShowUploadButton="True" onfileuploadcomplete="uplArchivo_FileUploadComplete" 
                                                    CssFilePath="~/App_Themes/Aqua/{0}/styles.css" CssPostfix="Aqua" SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"                                                    
                                                    FileUploadMode="OnPageLoad" ClientInstanceName="uploader">
                                                    <ValidationSettings MultiSelectionErrorText="Attention! 

                                                        The following {0} files are invalid because they exceed the allowed file size ({1}) or their extensions are not allowed. These files have been removed from selection, so they will not be uploaded. 

                                                        {2}">
                                                    </ValidationSettings>
                                                    <ClientSideEvents FileUploadComplete="function(s, e) {btnUpdate.DoClick();}">
                                                    </ClientSideEvents>
                                                    <UploadButton Text="Importar Archivo"></UploadButton>
                                                    <BrowseButton Text="Examinar..."></BrowseButton>
                                                    <CancelButton Text="Cancelar Importacion"></CancelButton>
                                                </dx:ASPxUploadControl>
                                                <dx:ASPxButton ID="btnUpdate" runat="server" ClientInstanceName="btnUpdate" ClientVisible="false" OnClick="CargarDatosGrid"></dx:ASPxButton>
                                                <dx:ASPxLabel ID="lblnomArchivo" runat="server" Text=" Nombre Archivo"></dx:ASPxLabel>
                                            </div>
                                            <div class="panel3">
                                                <dx:ASPxRadioButton ID="rbtCT" runat="server" Text="Cancelacion Total"  
                                                    GroupName="Cancelacion" Native="True" AutoPostBack="True" 
                                                    OnCheckedChanged="rbtCT_CheckedChanged">
                                                </dx:ASPxRadioButton>
                                            </div>
                                        </fieldset>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <dx:ASPxButton ID="btnGrabar" runat="server" Text="Grabar" style="margin-left:89%; margin-bottom:1em; width:75px;" AutoPostBack="false">
                                            <ClientSideEvents Click="function(s, e) {pcConfirmar.Show();}" />
                                        </dx:ASPxButton>
                                    </td>
                                </tr>
                            </table>
                        </div>
                        <div id="PopPup">
                            <dx:ASPxPopupControl ID="pcMensaje" runat="server" 
                                ClientInstanceName="pcMensaje" HeaderText="Mensaje" 
                                Width="350px" CloseAction="CloseButton" 
                                AllowDragging="True" EnableTheming="True" Modal="True" 
                                PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter" 
                                AllowResize="True" DragElement="Window">                            
                                <HeaderStyle>
                                <Paddings PaddingLeft="30px" />
                                <BackgroundImage HorizontalPosition="10px" ImageUrl="~/img/iconError.png" 
                                    Repeat="NoRepeat" />
                                </HeaderStyle>                            
                                <ContentCollection>
                                    <dx:PopupControlContentControl ID="PopupControlContentControl2" runat="server" SupportsDisabledAttribute="True">
                                        <table class="style1">
                                            <tr>
                                                <td align="center">
                                                    <dx:ASPxLabel ID="lblMensaje" runat="server">
                                                    </dx:ASPxLabel>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="center">                                                
                                                    <div style="padding:15px 0 0 0;" >
                                                        <dx:ASPxButton ID="ASPxButton1" runat="server" Text="Aceptar" Width="100px" AutoPostBack="False">
                                                            <ClientSideEvents Click="function(s, e) {pcMensaje.Hide();}" />
                                                        </dx:ASPxButton>
                                                    </div>                                                        
                                                </td>
                                            </tr>
                                        </table>
                                    </dx:PopupControlContentControl>
                                </ContentCollection>
                            </dx:ASPxPopupControl>
                            <dx:ASPxPopupControl ID="pcConfirmar" runat="server" AllowDragging="True" 
                                AllowResize="True" ClientInstanceName="pcConfirmar" CloseAction="CloseButton" 
                                DragElement="Window" EnableTheming="True" HeaderText="Grabar" Modal="True" 
                                PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter" 
                                Width="350px">
                                <HeaderStyle>
                                <Paddings PaddingLeft="30px" />
                                <BackgroundImage HorizontalPosition="10px" ImageUrl="~/img/iconError.png" 
                                    Repeat="NoRepeat" />
                                </HeaderStyle>
                                <ContentCollection>
                                    <dx:PopupControlContentControl runat="server" SupportsDisabledAttribute="True">
                                        <table class="style1">
                                            <tr>
                                                <td align="center">                                                
                                                    <p>Esta Seguro que desea grabar?</p>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="center">
                                                    <div style="width:205px;">
                                                        <div style="float:left;padding:15px 2px 0 0;">
                                                            <dx:ASPxButton ID="btnOK" runat="server"
                                                                Text="Aceptar" Width="100px" AutoPostBack="False" OnClick="Grabar">
                                                                <ClientSideEvents Click="function(s, e) {pcConfirmar.Hide();}" />
                                                            </dx:ASPxButton>
                                                        </div>
                                                        <div style="float:left;padding:15px 0 0 3px;">
                                                            <dx:ASPxButton ID="btnCancel" runat="server"
                                                                Text="Cancelar" Width="100px" AutoPostBack="False">
                                                                <ClientSideEvents Click="function(s, e) {pcConfirmar.Hide();}" />
                                                            </dx:ASPxButton>
                                                        </div>
                                                    </div>
                                                </td>
                                            </tr>
                                        </table>
                                    </dx:PopupControlContentControl>
                                </ContentCollection>
                            </dx:ASPxPopupControl>
                        </div>
                    </ContentTemplate>
                    <Triggers>
                        <asp:AsyncPostBackTrigger ControlID="btnUpdate" EventName="Click" />
                    </Triggers>
                </asp:UpdatePanel>
            </dx:PanelContent>
        </PanelCollection>  
    </dx:ASPxRoundPanel>
</asp:Content>
